package com.yidu.SystemsManagement.controller;

import com.yidu.BusinessParameters.entity.CashAccruedEntity;
import com.yidu.SystemsManagement.entity.Journal;
import com.yidu.SystemsManagement.service.JournalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class JournalController {
    @Autowired
    private JournalService journalService;

    @RequestMapping("/jour")
    @ResponseBody
    public Map JournalSelect(Journal journal){
        System.out.println("查询");
        List<Journal> journalList = journalService.Selectjournal(journal);
        for (Journal c:
                journalList) {
            System.out.println(c);
        }
        Map map=new HashMap();
        map.put("code",0);
        map.put("msg","");
        map.put("count",1);
        map.put("data",journalList);
        return map;
    }
}
